import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/page/takeoutManagement/model/takeout_management_card_data.dart';
import 'package:boss/ui/widget/image/base_image.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class TakeoutManagementCard extends StatelessWidget {
  final TakeoutManagementCardData data;
  final VoidCallback onTap;

  const TakeoutManagementCard({
    Key key,
    @required this.data,
    this.onTap,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            BaseImage(
              data.icon,
              width: 90.w,
              height: 90.w,
            ),
            Container(
              margin: EdgeInsets.only(
                top: 8.w,
              ),
              child: Text(
                data.title,
                style: TextStyleConstant().normal_1_22,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
